from selenium.webdriver.common.by import By


class  Rolelocator:

    #role菜单
    role_tab=(By.XPATH,"//li[contains(@data-menu-id,'ROLE_CST_LANDINGPAGE')]/span/div")

    #role_name
    #role_name=(By.XPATH,"//span[contains(@class,'tableName')]")
    role_name = (By.XPATH, "//*[contains(@class,'antd4-table-row')]/td[1]//span")

    #role_name搜索框
    role_name_search_input=(By.XPATH,"//span[contains(@class,'input-search search')]//input")

    #role_name搜索button
    role_name_search_button=(By.XPATH,"//button[contains(@class,'nput-search-button')]")

    #create_role_btn
    create_role_button=(By.XPATH,"//button[contains(@class,'buttonLeft')]")

    #create_name_input
    create_role_name=(By.CSS_SELECTOR,'input[id="creForm_roleName"]')

    #creat_next_button创建下一步按钮
    creat_next_button=(By.XPATH,"//button[contains(@class,'config-theme-system-user-primary-button')]")

    #创建角色成功
    add_success_prompt=(By.CSS_SELECTOR,'[class="anticon anticon-check-circle"]')

    #角色操作按钮
    role_operation_button=(By.XPATH,"//span[contains(@class,'table-operation-ellipsis')]")

    #role_delete角色删除按钮
    role_delete=(By.XPATH,"(//li[contains(@class,'dropdown-menu-item-only-child')])[2]/span")

    #role_preission_edit角色编辑按钮
    role_permission_edit=(By.XPATH,"(//li[contains(@class,'dropdown-menu-item-only-child')])[1]")

    #删除数据确认按钮
    role_I_acknowledge=(By.CSS_SELECTOR,'[class="antd4-checkbox"]')

    #确认删除按钮
    role_ok_confirm=(By.XPATH,"(//button[contains(@class,'config-theme-system-user-primary-button')])[2]")

    #编辑按钮
    role_edit=(By.XPATH,"//button[contains(@class,'table-operation-btnLine-btn')]")

    #编辑框清空内容按钮
    edit_clear_input=(By.XPATH,"//span[contains(@class,'anticon-close-circle')]")

    #编辑框角色名称
    edit_role_name=(By.CSS_SELECTOR,'[id="creForm_modifyRoleName"]')

    #编辑角色的权限bill
    bill_permission=(By.XPATH,'(//span[@class="antd4-tree-checkbox-inner"])[3]')

    #编辑角色权限confirm按钮
    bill_permission_edit_next=(By.XPATH,"//button[contains(@class,'nextButton')]")

    #overviewtab
    overview_tab=(By.XPATH,'//div[text()="Overview" and @role="tab"]')

    #role_permission_tab
    role_permission_tab=(By.XPATH,'//div[text()="Role Permissions" and @role="tab"]')

    #返回role页面
    #back_to_role_page=(By.XPATH,"(//span[contains(@class,'breadcrumb-link')])[1]")
    back_to_role_page = (By.XPATH, "//span[contains(@class,'anticon cre-page-container-header-panel-back')]")

    #spending_summary
    spending_summary=(By.XPATH,'(//span[@class="antd4-tree-checkbox-inner"])[5]')

    # spending_summary_tab
    spending_summary_tab=(By.CSS_SELECTOR,'[path="/work_bench/bills"]')

    #order_management
    order_management=(By.XPATH,'(//span[@class="antd4-tree-checkbox-inner"])[8]')

    # order_management
    order_management_tab = (By.XPATH, "//div[contains(@data-menu-id,'ORDER_CST')]")

    #翻页
    page_total=(By.CSS_SELECTOR,'[class="antd4-pagination-total-text"]')

    # basic_information_button
    basic_information_button = (By.XPATH, "//button[contains(@class,'system-user-common-border-button')]")

    #edit_role_header
    edit_role_header=(By.XPATH,"//div[contains(@class,'headerGroup')]/div")

    #query_result_element
    query_result_element=(By.CSS_SELECTOR,'[class="antd4-table-row antd4-table-row-level-0"]')
